import request from "../Utils/request"
import newrequest from "../Utils/newRequest"
//注册用户
export function AddUsers (data) {
    return request.post(`/Users`, data)
}
//用户登录
export function Login (data) {
    return request.post(`/Users/Login`, data)
}
//获得所用分类
export function CommodityType () {
    return request.get(`/CommodityType`)
}
//获得所有商品
export function GetCommodity () {
    return request.get(`/Commodity`)
}
//根据分类id获得对应商品
export function TypeIdCommodity (id) {
    return request.get(`/Commodity/GetType/${id}`)
}
//根据用户id查询对应头像
export function GetUserHeadPicture (id) {
    return newrequest.get(`/HeadPortrait/${id}`)
}
//根据用户id获得用户详细信息
export function GetUserOne (id) {
    return request.get(`/Users/GetOne/${id}`)
}
//根据商品id获得商品详细信息
export function GetCommodityAny (id) {
    return request.get(`/Commodity/GetId/${id}`)
}
//根据店铺id获得店铺详细信息
export function GetMerchant (id) {
    return request.get(`/Merchant/${id}`)
}
//加入购物车
export function AddShoppingCar (data) {
    return request.post(`/ShoppingTrolley`, data)
}
//根据商品id获得对应sku信息
export function GetSkuKey (id) {
    return request.get(`/Sku/${id}`)
}
//根据对应的skuid获得sku的value
export function GetSkuValue (id) {
    return request.get(`/ParameterValues/${id}`)
}
//用户关注店铺
export function AddUserLikeMerchant (data) {
    return request.post(`/MerchantAttention`, data)
}
